#include "readKNXCtrlCmd.h"

readKNXCtrlCmd::readKNXCtrlCmd(QObject *parent) :
    BaseCmd(parent)
{
    this->m_protocolType = ProtocolType::SWKNXProtol;
    this->m_functionCode = FunctionCode;
}

void readKNXCtrlCmd::unPackage(Package package)
{
    QByteArray body;


    body = package.body();
    if(body.size()>2)
    {
        m_groupAddress= body.at(0)<<8|body.at(1);
        m_knxLen = body.at(2);
        m_dataList = body.mid(3);

        //printf("KNX MAC is %d\r\n",m_Mac);
    }

}
Package readKNXCtrlCmd::toPackage()
{
    Package package;
    QByteArray body;

    return package;
}

quint16 readKNXCtrlCmd::groupAddress()
{
    return m_groupAddress;
}



quint8 readKNXCtrlCmd::knxLen()
{
    return m_knxLen;
}
QByteArray readKNXCtrlCmd::dataList()
{
    return m_dataList;
}
